package word4;
interface Phone{
   public abstract void receiveMessages();
   void call();
}

interface SmartPhone extends Phone{
    void faceTime();
}

class MiPhone implements SmartPhone{
    public void useMIUI() {
        System.out.println("正在使用小米手机");
    }

    @Override
    public void faceTime() {
        System.out.println("---视频通话----");
    }

    @Override
    public void receiveMessages() {
        System.out.println("---接收短信----");
    }

    @Override
    public void call() {
        System.out.println("---语音通话----");
    }
}
public class Test {
    public static void main(String[] args) {
        Phone phone = new MiPhone();
        if (phone instanceof MiPhone) {
            // ((MiPhone) phone).faceTime();

            MiPhone phone1 = (MiPhone) phone;
            phone1.useMIUI();
            phone1.faceTime();
        }
        phone.receiveMessages();
        phone.call();


    }
}
